﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>城市操作</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    @using (Html.BeginForm("opencity", "ljsheng", new { gid = Request.QueryString["gid"] }, FormMethod.Post, new { @class = "layui-form-pane layui-form" }))
    {
        <div class="layui-form-item">
            <label class="layui-form-label">选择省份</label>
            <div class="layui-input-inline">
                <select name="province" id="Province" lay-ignore>
                    <option></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">选择城市</label>
            <div class="layui-input-inline">
                <select name="city" id="City" lay-ignore>
                    <option></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <label class="layui-form-label">选择区域</label>
            <div class="layui-input-inline">
                <select name="area" id="Area" lay-ignore>
                    <option></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="text" name="sort" lay-verify="num" autocomplete="off" class="layui-input" onkeyup="value=value.replace(/[^\d]/g,'');" value="@ViewBag.sort">
            </div>
            <div class="layui-form-mid layui-word-aux">数字越大显示越前面</div>
        </div>
        <div class="layui-form-item" pane="">
            <label class="layui-form-label">是否显示</label>
            <div class="layui-input-block">
                <input type="radio" name="show" value="显示" title="显示" @(ViewBag.show != 2 ? "checked=\"\"" : "")>
                <input type="radio" name="show" value="不显示" title="不显示" @(ViewBag.show == 2 ? "checked=\"\"" : "")>
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn" lay-submit="">提交</button>
        </div>
    }
    <script src="~/plugins/layui/layui.js"></script>
    <script src="~/js/pca.js" charset="gb2312"></script>
    <script>
        setup();
        if ("@ViewBag.province".length > 0) {
            preselect("@ViewBag.province");
            document.getElementById("City").value = "@ViewBag.city";
            change(2);
        }
        layui.use(['form'], function () {
            var form = layui.form();
        });
    </script>
</body>
</html>